package com.ruoyi.manager.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.manager.domain.City;
import com.ruoyi.manager.service.ICityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: ruoyi
 * @description: 省市县
 * @author: yuxiang
 * @create: 2021-09-02 11:26
 */
@RestController
@RequestMapping("/provinceToDistrict")
public class CityController {
    @Autowired
    private ICityService cityService;

    @GetMapping("/getCityTree")
    public AjaxResult Linkage() {
        List<City> cityTreeList = cityService.cityTreeList();
        return AjaxResult.success(cityTreeList);
    }
}
